﻿using System.Linq;
namespace System.Net.DnsToolkit.Util {
    public static class StringExtension {

        public static string Repeat(this string text, int count) {
            return new string(Enumerable.Repeat<string>(text, count)
                        .SelectMany(s => s.ToCharArray()).ToArray());
        }

        public static string[] Multiply(this string text, int count) {
            return Enumerable.Repeat<string>(text, count).ToArray();
        }

    }
    
}
